package cn.xzhang.boot.model.dto.carousel;

import cn.xzhang.boot.model.enums.JumpTypeEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;


/**
 * 轮播图基础信息类
 *
 * @author <a href="https://github.com/XiaoZhangCode">XiaoZhangCode</a>
 */
@Data
@Schema(name = "轮播图基础信息类", description = "轮播图基础信息")
public class CarouselBaseDTO implements Serializable {

    @NotEmpty(message = "跳转链接地址不能为空")
    @Schema(description = "跳转链接地址")
    private String url;

    @Schema(description = "排序字段",requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "排序字段不能为空")
    private Integer sort;

    @NotNull(message = "缩略图地址不能为空")
    @Schema(description = "缩略图地址",requiredMode = Schema.RequiredMode.REQUIRED)
    private String picUrl;

    /**
     * @link {@link JumpTypeEnum}
     */
    @Schema(description = "跳转方式",requiredMode = Schema.RequiredMode.REQUIRED)
    private String target = JumpTypeEnum.SELF.getValue();

    @Schema(description = "外部小程序的app-id",requiredMode = Schema.RequiredMode.REQUIRED)
    private String appId;


}
